label: Tweak selection behavior
authorMatthias Clasen <mclasen@redhat.com>
Sat, 3 Dec 2022 10:16:50 +0000 (11:16 +0100)
committerLuca Bacci <luca.bacci982@gmail.com>
Sat, 3 Dec 2022 10:19:29 +0000 (11:19 +0100)
Arrange for double-click-followed-by-drag to do
select by words, not select-and-dnd. This matches
the behavior in GtkTextView better and feels
intuitive.

Fixes: #2024
gtk/gtklabel.c

index 7933ab2af733275ce5dabf1c1b402b9f578d2d50..468ef2ae87d964e6e2c85971b3383fe8c32ee943 100644 (file)
@@ -5222,7 +5222,8 @@ gtk_label_drag_gesture_begin (GtkGestureDrag *gesture,
     {
       if (min < max && min <= index && index <= max)
         {
-          info->in_drag = TRUE;
+          if (!info->select_words)
+            info->in_drag = TRUE;
           info->drag_start_x = start_x;
           info->drag_start_y = start_y;
         }